Release Notes for 16-Bit Language Tools for MPLAB® IDE
v3.00 (B) Support Update
13 April 2007

Table of Contents
  1. Overview
  2. GNU General Public License
  3. Devices Supported
  4. Installation
  5. MPLAB ASM30, MPLAB LINK30 Documentation
  6. What's New in this Release
  7. Migrating to Version 3.0x
  8. Documentation Updates
  9. Fixed Issues
  10. Limitations
  11. Environment Variables Modified
  12. Customer Support


  1. Overview

  2. The 16-Bit language tools consist of an assembler (pic30-as.exe) and a linker (pic30-ld.exe). These tools are sometimes referred to as the "ASM30 Suite". The user's guide describes additional utilities that are not supported by the MPLAB IDE and therefore are not supplied in this release.

  3. GNU General Public License

  4. With the exceptions noted below, the 16-Bit tools are written and distributed under the GNU General Public License (GPL) which means that its source code is freely distributed and available to the public.

    The source for the tools under the GNU GPL may be downloaded separately from the Microchip WWW web page. You may read the GNU GPL in the file named COPYING located the top level of your install directory. A general discussion of principles underlying the GPL may be found at www.gnu.org/copyleft.

    Exceptions to the GNU GPL:

    • pic30-lm
    • pic30-pa
    • sim30

    Support code provided for the header files, linker scripts, and runtime libraries are also exceptions to, and therefore not covered under, the GPL.

  5. Devices Supported

  6. The following dsPIC30 devices are supported:

         30F1010  30F2010  30F3010  30F4011  30F5011  30F6010
                  30F2011  30F3011  30F4012  30F5013  30F6010A
                  30F2012  30F3012  30F4013  30F5015  30F6011
                  30F2020  30F3013           30F5016  30F6011A
                  30F2023  30F3014                    30F6012
                                                      30F6012A
                                                      30F6013
                                                      30F6013A
                                                      30F6014
                                                      30F6014A
                                                      30F6015
    

    The following PIC24 devices are supported:

         24FJ16GA002   24FJ32GA002
         24FJ16GA004   24FJ32GA004
    
    
         24FJ48GA002   24FJ64GA002    24FJ96GA006    24FJ128GA006
         24FJ48GA004   24FJ64GA004    24FJ96GA008    24FJ128GA008
                       24FJ64GA006    24FJ96GA010    24FJ128GA010
                       24FJ64GA008
                       24FJ64GA010
    
    
         24HJ12GP201   24HJ16GP304
         24HJ12GP202
    
         24HJ32GP202   24HJ64GP206    24HJ128GP206   24HJ256GP206
         24HJ32GP204   24HJ64GP210    24HJ128GP210   24HJ256GP210
                       24HJ64GP506    24HJ128GP306   24HJ256GP610
                       24HJ64GP510    24HJ128GP310   
                                      24HJ128GP506
                                      24HJ128GP510
    

    The following dsPIC33 devices are supported:

         33FJ12GP201   33FJ16GP304
         33FJ12GP202
    
         33FJ32GP202   33FJ64GP206    33FJ128GP206   33FJ256GP506
         33FJ32GP204   33FJ64GP306    33FJ128GP306   33FJ256GP510
                       33FJ64GP310    33FJ128GP310   33FJ256GP710
                       33FJ64GP706    33FJ128GP706
                       33FJ64GP708    33FJ128GP708
                       33FJ64GP710    33FJ128GP710
    
         33FJ12MC201   33FJ16MC304
         33FJ12MC202
    
         33FJ32MC202   33FJ64MC506    33FJ128MC506   33FJ256MC510
         33FJ32MC204   33FJ64MC508    33FJ128MC510   33FJ256MC710
                       33FJ64MC510    33FJ128MC706
                       33FJ64MC706    33FJ128MC708
                       33FJ64MC710    33FJ128MC710
    

    The following 'virtual' devices are supported:

    • generic-16bit - this device can be used to represent a generic core device (no peripherals of any kind)
  7. Installation

  8. The dsPIC language tools are installed with the MPLAB IDE installer.

  9. MPLAB ASM30, MPLAB LINK30 Documentation

  10. The following documents pertain to the MPLAB ASM30 and MPLAB LINK30, these may be installed as part of the full product or downloaded from Microchip's Web-site:

    • MPLAB ASM30, MPLAB LINK30 and Utilities User's Guide
    • dsPIC30F Language Tools Quick Reference Card

    We refer to these documents throughout this README in somewhat familiar terms.

    Updates to these manuals, that have not made it into (virtual) print, can be found later in this README.

  11. What's New in this Release.

  12. v3.00 (B) Support Update

    This support update to version 3.00 includes 13 new devices 24FJ16GA002, 24FJ16GA004, 24FJ48GA002, 24FJ48GA004, 24HJ16GP304, 24HJ32GP202, 24HJ32GP204, 33FJ16GP304, 33FJ32GP202, 33FJ32GP204, 33JF16MC304, 33FJ32MC202 and 33FJ32MC204.

    A customer can determine if this update has been installed by examining the C30 version string. A version string is displayed by executing the following command:

           pic30-as --version
    The version string before update is: (dsPIC30, Microchip v3.00) (A)
    The version string after update is: (dsPIC30, Microchip v3.00) (B)

    v3.00

    This release provides a number of enhancements to make accessing the unique features of the dsPIC easier. These are summarized below, with more information available in the accompanying documentation.

    Some highlights:

    • The tool chain supports the new PIC24 and dsPIC33F devices.
    • The tool chain supports new features making working with CodeGuard® easier.

    Assembler

    • The assembler accepts two new section attributes for CodeGuard: boot and secure. These attributes may be applied to sections of type code, bss, psv, and eedata. When applied to a code section, an optional argument may be added to specify entries in the access entry point table. For details see 6.3, "Directives that Define Sections", in the MPLAB ASM30/LINK30 and Utilities User Guide.
    • The assembler provides two new special operators: boot and secure. These operators are provided to get the address of functions in the boot or secure segments, or to transfer control to such functions.
    • New directives have been added for storing ASCII strings in program memory: .pascii, .pasciz, and .pstring. These directives can be used to store character data into all three bytes of each program memory word. Please see Documentation Updates for more details.

    Linker

    • Valid CodeGuard segment sizes and configuration options for all supported devices are initialized. Segment sizes and options may be specified in the IDE Build Options dialog, on the command line, or in source code via FGS, FSS, FBS config word definitions. See 8.8, "Options that Specify CodeGuard Security Features", in the MPLAB ASM30/LINK30 and Utilities User Guide.
    • User-defined boot and secure segments are also supported in program memory and data memory. This allows an application to take advantage of the CodeGuard language extensions on any device, not just CodeGuard enabled devices.
    • The linker collects boot and secure input sections and allocates them according to the options specified.
    • Access entry tables for boot and secure segments are created automatically, if access entry points have been defined in source code.
  13. Migrating to Version 3.00

  14. Most existing projects can be migrated to MPLAB C30 v3.00 without modification. Minor source code updates may be required to address the following issues.

    • Link failure using MPLAB IDE v7.52

      When using an intermediate directory (selected from the Directories Tab of the Build Options For Project dialogue box) the linker may fail to link correctly if the project contains user generated assembly files. This will be corrected in a later version of MPLAB IDE, for now you may disable the intermediate directory to achieve a successful link

      This has been fixed in MPLAB IDE v7.60.

    • Change to definition of .text in linker scripts

      In the standard linker scripts, output section .text is no longer fixed at address __CODE_BASE. This change was required for CodeGuard support. Existing projects with custom linker scripts will continue to work without modification. However, if CodeGuard boot or secure functions will be added to the project, __CODE_BASE should be removed from the definition of output section .text. For example:
       /*
        ** User Code and Library Code
        **
        ** This section must not be assigned to __CODE_BASE,
        ** because CodeGuard(tm) sections may be located there.
        */
        .text :
        {
              *(.handle);
              *(.libc) *(.libm) *(.libdsp);  /* keep together in this order */
              *(.lib*);
              *(.text);
        } >program
      
  15. Documentation Updates

    • Three new assembler directives can be used to store character data into program memory.
      • .pascii "string1"

        stores a sequence of ascii characters (with no automatic trailing zero byte) into program memory, including the upper byte.

      • .pasciz "string2"

        stores a sequence of ascii characters (with an automatic trailing zero byte) into program memory, including the upper byte.

      • .pstring "string2"

        is the same as .pasciz "string2".

  16. Fixed Issues

  17. v3.00

      Assembler

    • BIN30-42 - Unit ID not supported via macros on dsPIC30F devices
    • BIN30-61 - Undefined symbol error for weak symbol when extracted from an archive
    • BIN30-69 - For PIC24FJ32GA002/004 and PIC24FJ64GA002/004, bit 14 ( T1IP2) for the IPC0 SFR is defined in the datasheet, however this bit is not defined in the include files.
    • BIN30-70 - For PIC24FJ32GA002/004 and PIC24FJ64GA002/004, bit 2 (OCM2) of OC1CON and OC3CON SFR is defined in the datasheet, however this bit is not defined in the include files.
    • BIN30-74 - CNInterrupt installed at wrong vector address for SMPS devices
  18. Limitations

  19. The current limitations are as follows:

      Assembler

    • Arguments to the address() section attribute must be even.
    • The default section alignment is 2**1. Therefore the minimum section length is 2 bytes in data memory, and 2 PC units (3 bytes) in program memory.
    • BIN30-2/26070 - The .pushsection, .popsection directives are not implemented.
    • BIN30-3/15741 - The .lcomm directive causes incorrect source line numbers in the assembler listing file.
    • BIN30-5/20016 - Special operators should not accept odd offsets in program memory.
    • BIN30-8/21797 - The .align directive changes section alignment regardless of max-skip.
    • BIN30-10/23306 - The option -g does not work with any section other than .text.
    • BIN30-17/25555 - Cannot generate code for goto $-2.
    • BIN30-22/28477- Unexpected results using .equiv as value for another .equiv.

      The following example is not encoded correctly:

           .equiv var1,root+1
           .equiv var2,var1
           .word var1  ; encodes root+1
           .word var2  ; encodes root
      

      This can happen when the value specified in .equiv is the name of an SFR high byte such as _LATBH, which is defined in the processor include files as an .equiv. The workaround in this case would be to refer to the base register itself, i.e. _LATB+1

    • BIN30-46 - Config Word Names for the _FBS and _FSS macros in the device header files are different for the dsPIC30F devices and PIC24H/dsPIC33F devices
    • BIN30-49 - Bits 8 - 12 for the AD1CON3 are names as SMPI<4:0> in the datasheet however these bits are named as SAMC<4:0> in the .inc files of dsPIC33FJ12GP201/202 and dsPIC33FJ12MC201/202
    • BIN30-52 - Bits 0-4 of the RPINR15 SFR for the dsPIC33FJMC201/202 are spelt as INXDR<4:0> in the datasheet, whereas these bits are spelt as INDXR<4:0> in the .inc file
    • BIN30-53 - Missing Bit Definitions for the PMD3 SFR in the .inc file of dsPIC33FJ12MC201/202 devices
    • BIN30-65 - pic30-as produces incorrect error message (error is correct, message is wrong)
    • add w0, #52, w0
      {standard input}: Assembler messages:
      {standard input}:1: Error: Invalid operands specified ('add w0,#52,w0').
      {standard input}:1:        Check operand #2. Operand must be between -8 and 7, inclusive.
      MPLAB ASM30 Listing:                    page 1
      
      
         1                    add w0,#52,w0
      

      This instruction takes a 5-bit unsigned literal (according to the docs) so it should be between 0 and 31 inclusive.

    • BIN30-88 - For 24FJ16GA002, 24FJ16GA004 , 24FJ48GA002,and 24FJ48GA004 bits are defined for PORTA in the .inc files but the datasheet says they should not be defined for these devices
    • Linker

    • BIN30-23/28952 - Multiple definition error with custom linker script

      If a linker script is modified to place the .text section from one object file before all the others, multiple definition errors can result. When this occurs the linker acts as if the section was included twice. The workaround is to specify a full pathname, or *, before the object file name:

                   /*
                   ** User Code and Library Code
                   */
                   .text __CODE_BASE :
                   {
                      *(.handle);
                      *(.libc) *(.libm) *(.libdsp);  /* keep together in
                                                        this order */
                      *(.lib*);
                      myfile.o(.text);   /* this form causes error */
                      *myfile.o(.text);  /* this form works OK */
                      *(.text);
                   } >program
      
    • BIN30-30/25966 - Functions with the address attribute may cause a link error.

      Some addresses will be invalid for the address attribute, notably those that are used for the .handle, .libc, .libm, .libdsp and other .lib sections.

      Addresses that conflict the .text section can be accommodated by modifying the linker script. To modify the linker script, simply remove the .text section from the list of input sections for the output section named .text. For example, it may be modified to read:

                   /*
                   ** User Code and Library Code
                   */
                   .text __CODE_BASE :
                   {
                      *(.handle);
                      *(.libc) *(.libm) *(.libdsp);  /* keep together in
                                                        this order */
                      *(.lib*);
                                                     /* *(.text); */
                   } >program
      
      This will cause the linker to place the .text input sections after satisfying all of the absolute section requirements.

    • BIN30-31 - Some sections are still flagged as relocatable after linking
    • BIN30-64 - References to OSCCONL AND OSCCONH missing in the dsPIC30F/33F linker scripts

      As a workaround, use OSCCON for OSCCONL and OSCCON+1 for OSCONH.

    • BIN30-77 - Not enough contiguous memory for section .const.

      On certain devices, applications with large amounts of auto_psv data may fail to link with this message, even though the total amount of memory used does not exceed the flash capacity. This is because sections .text and .const have each been allocated in large blocks and the PSV page alignment requirement can't be satisfied.

      As a workaround, comment out one line of the linker script as noted above for BIN30-30. This will allow section .text to be allocated in smaller portions, flowing around .const if necessary.

    • BIN30-80 - Link error with ELF, large code model and function pointer to boot or secure access slot

      If an ELF C program is built with -mlarge-code, or an ELF assembly program uses call or goto instructions, then function pointer references to boot or secure access entry slots may fail with the following error:

          Cannot use WORD - ACCESS on a symbol (__boot_entry:n) that
          is not located in a code, psv, or eedata section.
      

      The problem is confusing because it is source code dependant. If the access entry slot reference appears before any call or goto instructions, the program will link correctly. For example:

          .text
          .global __reset
      __reset:
          mov #boot(1),w1
          call foo
          mov #boot(2),w2
          ; ...
      

      In this example, only the second function pointer reference will result in an error. If the program is written in C, then the order of instructions may vary with optimization level.

      Possible work-arounds are:

      • use the COFF object file format
      • use -msmall-code for the entire project, or at least for source files that assign function pointers
      • try to re-order statements so that the function pointer reference appears before any call or goto instructions.
  20. Environment Variables Modified

  21. This installation makes no changes to the way environment variables have been updated previously.

    Modified environment variables are identified as part of the installation procedure and are documented in the manuals.

  22. Customer Support

  23. The Microchip Web Site

    Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information:

    • Product Support - Data sheets and errata, application notes and sample programs, design resources, user's guides and hardware support documents, latest software releases and archived software
    • General Technical Support - Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing
    • Business of Microchip - Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives
    Development Systems Customer Change Notification Service

    Microchip's customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest.

    To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions.

    The Development Systems product group categories are:

    • Compilers - The latest information on Microchip C compilers and other language tools. These include the MPLAB C18 and MPLAB C30 C compilers; MPASM™ and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30 object linkers; and MPLIB™ and MPLAB LIB30 object librarians.
    • Emulators - The latest information on Microchip in-circuit emulators. This includes the MPLAB REAL ICE™, MPLAB ICE 2000 and MPLAB ICE 4000 in-circuit emulators.
    • In-Circuit Debuggers - The latest information on the Microchip in-circuit debuggers. This includes the MPLAB ICD 2 and PICkit™ 2.
    • MPLAB IDE - The latest information on Microchip MPLAB IDE, the Windows® Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and MPLAB SIM simulator, as well as general editing and debugging features.
    • Programmers - The latest information on Microchip programmers. These include the MPLAB PM3 and PRO MATE® II device programmers and the PICSTART® Plus, PICkit 1 and PICkit 2 development programmers.
    Additional Support

    Users of Microchip products can receive assistance through several channels:

    • Distributor or Representative
    • Local Sales Office
    • Field Application Engineer (FAE)
    • Technical Support

    Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is available on our website.

    Technical support is available through the web site at: http://support.microchip.com